﻿<?php

class TTableManutencao
{
    private $obj;
    
    function __construct(Requerir $obj) {
        $this->obj = $obj;
    }
    
    public function render()
    {
$html = "<table>
    <thead>
        <tr>
            <th>Laboratorio: {$this->obj->getLocalEquipamento()}</th>
            <th>Equipamento: {$this->obj->getEquipamentoRequisicao()}</th>
            <th>Defeito: {$this->obj->getDefeitoRequisicao()}</th>
        </tr>
        <tr>
            <th>Data: {$this->obj->getDtRequisicao()}</th>
            <th>Requisitante: {$this->obj->loadRequisitante()}</th>
        </tr>
        <tr>
            <th>Data</th>
            <th>Providencia</th>
            <th>Responsavel</th>
        </tr>
    </thead>
    <tbody>";
 $manutencoes = $this->obj->loadManutencoes();
    foreach($manutencoes as $manu){ 
        $html .= "<tr>
            <td class='col1'>{$manu->getDataManutencao()}</td>
            <td class='col2'>{$manu->getProvidenciaManutencao()}</td>
            <td class='col3'>{$manu->loadResponsavel()}</td>
        </tr>";
    }
$html .="    </tbody>
</table>";   

        return $html;
     }
}

?>
